<!doctype html>
<html lang="en">
 <head>
  <meta charset="UTF-8">
  <meta name="Generator" content="EditPlus®">
  <meta name="Author" content="">
  <meta name="Keywords" content="">
  <meta name="Description" content="">
  <title>jQuery的两把利器</title>
   <script src="jquery-1.11.3.min.js"></script>
 </head>
 <body>
    <button id="btn1">确定</button> <br>
	<input id="input1" type="text1"> <br>
	<input id="input2" type="text2">
 </body>
 <script>
    $("#btn1").click(function(){
	    $("#input1").val($(this).text());
		$("<br><input id='input3' type='text'>").appendTo($("body"));
	});

	var array = [1,2,3,4,5,6,7,8,9,10];
	$("#btn1").click(function(){
	   
	   $.each(array,function(index,text){
	       $("<br><span> array["+index+"]---"+text+"</span>").appendTo($("body"));
	   });
	
	});

	$("input").each(function(i){
	   $(this).val(i);
	})
 </script>
</html>
